<html>
<head>
<meta HTTP-EQUIV=CONTENT-TYPE CONTENT="text/html; charset=utf-8">
<title>Slide 74</title>
</head>
<body>
<center>
<a href="text0.html">First page</a> <a href="text72.html">Back</a> <a href="text74.html">Continue</a> <a href="text82.html">Last page</a> <a href="whatswrong.html">Overview</a> <a href="img73.html">Graphics</a></center><br>
<h1><b>Factories</b></h1><p>
<ul><li><h2>Builder uses a factory to build nodes</h2>
<li><h2>Default factory builds standard classes</h2>
<li><h2>Can change factories using the setFactory() method in Builder</h2>
<li><h2>Subclassing enables:</h2>
<ul><li>Extra utility methods
<ul><li><b>public String getAttributeValue(String name, String uri, String default)</b>
</ul><li>Read-only tree
<li>Application specific classes
<ul><li><b>XHTMLElement</b>
<li><b>PElement</b>
<li><b>DivElement</b>
<li>etc.
</ul></ul></ul></body>
</html>